#@layout()
<script>
    function changeTaskStatus(){
        var statusId = $("#changeStaus option:selected").attr("value");
        var taskId = $("#taskId").val();
        $.ajax({
            url:"#(contextPath)/admin/task/changeStatus",
            type:"post",
            data:{'statusId':statusId,"id":taskId},
            success:function(data){
                alert(data.msg);

            }

        })
	}
</script>
 #define main()

<div class="form form-horizontal">
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3">任务状态：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<select id="changeStaus">
				#for(obj : statusList)
				<option value="#(obj['statusId'])">#(obj["status"])</option>
				#end
			</select>
		</div>
	</div>
	<div class="row cl" style="margin-top: 100px">
		<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
			<input type="hidden" value="#(id)" id="taskId" name="id">
			<button onclick="changeTaskStatus()" style="width: 150px"> 保存 </button>
		</div>
	</div>
</div>
#end
